/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.stripesbook.article.view;

import org.stripesbook.article.action.*;
import org.stripesbook.rayures.view.ViewObject;
import org.stripesbook.rayures.view.stripes.SForm;
import org.stripesbook.rayures.view.stripes.SLink;
import org.stripesbook.rayures.view.stripes.SPassword;
import org.stripesbook.rayures.view.stripes.SSubmit;
import org.stripesbook.rayures.view.stripes.SText;

public class RegisterView extends ViewObject<RegisterView> {

  public SForm getForm() {
    return tag(ExampleForm.class).beanclass(RegisterActionBean.class)
      .addInput(tag(SText.class).name("user.email"), "Email")
      .addInput(tag(SText.class).name("user.username"), "Username")
      .addInput(tag(SPassword.class).name("user.password"), "Password")
      .addInput(tag(SPassword.class).name("confirmPassword"), "Confirm password")
      .addButton(tag(SSubmit.class).name("register").value("Register"));
  }

  public SLink getActivateLink() {
    return tag(SLink.class).beanclass(ActivateActionBean.class).label("click here");
  }

  public SLink getLoginLink() {
    return tag(SLink.class).beanclass(LoginActionBean.class).label("login");
  }
}
